Ext.define('Admin.view.processdefinition.ProcessDefinitionUploadWindow', {
    extend: 'Ext.window.Window',
    alias: 'widget.processdefinition-upload-window',
    autoShow: true,
    modal: true,
    
    width: 200,
    height: 200,
	title:'发布流程',
	layout: 'fit',
	items:[{xtype:'processdefinition-upload-form'}],
	/*	*/
    afterRender: function () {
        var me = this;
        me.callParent(arguments);
        me.syncSize();
        // Since we want to always be a %age of the viewport, we have to watch for
        // resize events.
        Ext.on(me.resizeListeners = {
            resize: me.onViewportResize,
            scope: me,
            buffer: 50
        });
    },
    doDestroy: function () {
        Ext.un(this.resizeListeners);

        this.callParent();
    },

    onViewportResize: function () {
        this.syncSize();
    },
    syncSize: function () {
        var width = Ext.Element.getViewportWidth(),
            height = Ext.Element.getViewportHeight();
        // We use percentage sizes so we'll never overflow the screen (potentially
        // clipping buttons and locking the user in to the dialog).
        this.setSize(420, 160);
        this.setXY([ Math.floor(width * 0.3), Math.floor(height * 0.3) ]);
    }

});
